{% extends "res_list.html" %}  
{% block search %}  
    <div class="col-sm-3">  
                        <div class="input-group">  
                            <span class="input-group-addon" id="device_hostname" >主机名称</span>  
                         <!-- 如果之前已经写入了device_hostname的信息，那么页面重新加载后保留-->  
                            <input type="text" class="form-control" placeholder="" aria-describedby="device_hostname" name="device_hostname"  
                                    {% if request.GET.device_hostname %}value = {{ request.GET.device_hostname }}{% endif %}>  
                        </div>  
                     </div>  
  
                     <div class="col-sm-3">  
                        <div class="input-group">  
                            <span class="input-group-addon" id="device_address">主机地址</span>  
                            <input type="text" class="form-control" placeholder="" aria-describedby="device_address" name = "device_address"  
                                    {% if request.GET.device_address %}value = {{ request.GET.device_address }}{% endif %}>  
                        </div>  
                     </div>  
  
                     <div class="col-sm-3">  
                         <div class="input-group">  
                             <span class="input-group-addon" id="device_type">主机类型</span>  
                             <select class="form-control" name="device_type">  
                                 <option value="">所有类型</option>  
                                 <option value="阿里云" {% if request.GET.device_type and request.GET.device_type == '阿里云'%} selected{% endif %}>阿里云</option>  
                                 <option value="腾讯云" {% if request.GET.device_type and request.GET.device_type == '腾讯云'%} selected{% endif %}>腾讯云</option>  
                                 <option value="本地虚拟机" {% if request.GET.device_type and request.GET.device_type == '本地虚拟机'%} selected{% endif %}>本地虚拟机</option>  
                                 <option value="贵阳机房" {% if request.GET.device_type and request.GET.device_type == '贵阳机房'%} selected{% endif %}>贵阳机房</option>  
                            </select>  
                             </div>  
                    </div>
{% endblock %}  
  
{% block table_tr %} 

<th>主机名称</th>  
<th>主机地址</th>  
<th>SSH端口</th>  
<th>主机类型</th>

{% endblock %}  
{% block table_td %}

<td>{{ item.device_hostname }}</td>  
<td>{{ item.device_address }}</td>  
<td>{{ item.device_port }}</td>  
<td>{{ item.device_type }}</td>  

{% endblock %}  
